From: Gerd Moellmann Date: Thu, 23 Aug 2001 13:18:33 +0000 (+0000) Subject: (Finsert_file_contents): If VISIT is non-nil, and X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~62345 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=1f83434377b127eca9a0296e983c7e4949974c15;p=emacs.git (Finsert_file_contents): If VISIT is non-nil, and coding.type is coding_type_no_conversion or coding_type_raw_text, use Fset_buffer_multibyte to make the buffer unibyte if REPLACE is non-nil instead of just setting enable_multibyte_characters in the buffer to nil. --- diff --git a/src/fileio.c b/src/fileio.c index a8edc2f75b7..271cee1a4f0 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4344,8 +4344,14 @@ actually used.") { /* Visiting a file with these coding system always make the buffer unibyte. */ - current_buffer->enable_multibyte_characters = Qnil; - coding.dst_multibyte = 0; + if (!NILP (replace) + && !NILP (current_buffer->enable_multibyte_characters)) + Fset_buffer_multibyte (Qnil); + else + { + current_buffer->enable_multibyte_characters = Qnil; + coding.dst_multibyte = 0; + } } if (inserted > 0 || coding.type == coding_type_ccl)